package org.sundatagroup.aurora.show.entity.status;

import com.google.gson.JsonObject;

/**
 * <p>向前台发送的展示的状态信息封装类, 等待
 * </p>
 * 
 * @author lui
 * @date 2018-04-20
 * @since 0.1.1
 */
public class WaitingStatus implements IStatusEntity {
    private String sid;

    public WaitingStatus(String sid){
        this.sid = sid;
    }
	
    WaitingStatus(JsonObject jo) {
		sid = jo.get("sid").getAsString();
	}

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public final DisplayStatus getStatus() {
        return DisplayStatus.WAITING;
    }
    @Override
    public JsonObject toJson() {
        JsonObject jo = new JsonObject();
        jo.addProperty("status", "waiting");
        jo.addProperty("sid", sid);
        return jo;
    }
	
	@Override
	public String toString() {
		return "WaitingStatus " + toJson().toString();
	}
}
